<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改楼层信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-floorinfo-edit" th:object="${SysFloor}">
            <input name="floorId" th:field="*{floorId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">序号：</label>
                <div class="col-sm-8">
                    <input name="num" th:field="*{num}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">楼层名：</label>
                <div class="col-sm-8">
                    <input name="floorName" th:field="*{floorName}" class="form-control" type="text">

                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">物业管参数：</label>
                <div class="col-sm-8">
                    <input name="propertyManaParam" th:field="*{propertyManaParam}" class="form-control" type="text">
                    <!--<select name="propertyManaParam" class="form-control" id="propertyManaParam" th:field="*{propertyManaParam}">-->
                        <!--<option th:text="*{propertyManaParam}" th:value="*{propertyManaParam}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">空关参数：</label>
                <div class="col-sm-8">
                    <input name="sunElecParam" th:field="*{sunElecParam}" class="form-control" type="text">
                    <!--<select name="emptyParam" class="form-control" id="emptyParam" th:field="*{emptyParam}">-->
                        <!--<option th:text="*{emptyParam}" th:value="*{emptyParam}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">水费参数：</label>
                <div class="col-sm-8">
                    <input name="waterParam" th:field="*{waterParam}" class="form-control" type="text">
                    <!--<select name="waterParam" class="form-control" id="waterParam" th:field="*{waterParam}">-->
                        <!--<option th:text="*{waterParam}" th:value="*{waterParam}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">消防空调(度)：</label>
                <div class="col-sm-8">
                    <input name="fireAirCondition" th:field="*{fireAirCondition}" class="form-control" type="text">
                    <!--<select name="fireAirCondition" class="form-control" id="fireAirCondition" th:field="*{fireAirCondition}">-->
                        <!--<option th:text="*{fireAirCondition}" th:value="*{fireAirCondition}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">照明电量参数：</label>
                <div class="col-sm-8">
                    <input name="sunElecParam" th:field="*{sunElecParam}" class="form-control" type="text">
                    <!--<select name="sunElecParam" class="form-control" id="sunElecParam" th:field="*{sunElecParam}">-->
                        <!--<option th:text="*{sunElecParam}" th:value="*{sunElecParam}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">照明电费用参数：</label>
                <div class="col-sm-8">
                    <input name="properElecCoef" th:field="*{properElecCoef}" class="form-control" type="text">
                    <!--<select name="properElecCoef" class="form-control" id="properElecCoef" th:field="*{properElecCoef}">-->
                        <!--<option th:text="*{properElecCoef}" th:value="*{properElecCoef}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">动力电量参数：</label>
                <div class="col-sm-8">
                    <input name="powerBatteryParam" th:field="*{powerBatteryParam}" class="form-control" type="text">
                    <!--<select name="powerBatteryParam" class="form-control" id="powerBatteryParam" th:field="*{powerBatteryParam}">-->
                        <!--<option th:text="*{powerBatteryParam}" th:value="*{powerBatteryParam}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">动力电费用参数：</label>
                <div class="col-sm-8">
                    <input name="pubElecCoef" th:field="*{pubElecCoef}" class="form-control" type="text">
                    <!--<select name="pubElecCoef" class="form-control" id="pubElecCoef" th:field="*{pubElecCoef}">-->
                        <!--<option th:text="*{pubElecCoef}" th:value="*{pubElecCoef}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">公用电分摊参数：</label>
                <div class="col-sm-8">
                    <input name="eleSchareFeeParam" th:field="*{eleSchareFeeParam}" class="form-control" type="text">
                    <!--<select name="eleSchareFeeParam" class="form-control" id="eleSchareFeeParam" th:field="*{eleSchareFeeParam}">-->
                        <!--<option th:text="*{eleSchareFeeParam}" th:value="*{eleSchareFeeParam}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">公用电分摊参数：</label>
                <div class="col-sm-8">
                    <input name="pubElecShareParam" th:field="*{pubElecShareParam}" class="form-control" type="text">
                    <!--<select name="pubElecShareParam" class="form-control" id="pubElecShareParam" th:field="*{pubElecShareParam}">-->
                        <!--<option th:text="*{pubElecShareParam}" th:value="*{pubElecShareParam}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">空调电分摊参数：</label>
                <div class="col-sm-8">
                    <input name="airConditionShareParam" th:field="*{airConditionShareParam}" class="form-control" type="text">
                    <!--<select name="airConditionShareParam" class="form-control" id="airConditionShareParam" th:field="*{airConditionShareParam}">-->
                        <!--<option th:text="*{airConditionShareParam}" th:value="*{airConditionShareParam}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">空调油费参数：</label>
                <div class="col-sm-8">
                    <input name="airConditionOilParam" th:field="*{airConditionOilParam}" class="form-control" type="text">
                    <!--<select name="airConditionOilParam" class="form-control" id="airConditionOilParam" th:field="*{airConditionOilParam}">-->
                        <!--<option th:text="*{airConditionOilParam}" th:value="*{airConditionOilParam}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">油费合计：</label>
                <div class="col-sm-8">
                    <input name="oilSum" th:field="*{oilSum}" class="form-control" type="text">
                    <!--<select name="oilSum" class="form-control" id="oilSum" th:field="*{oilSum}">-->
                        <!--<option th:text="*{oilSum}" th:value="*{oilSum}"></option>-->
                        <!--<option th:each="a:${sysParamterList}" th:value="${a.paramterValue}" th:text="${a.paramterValue}"></option>-->
                    <!--</select>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">更新日期：</label>
                <div class="col-sm-8">
                    <input name="updatetime" th:field="*{updatetime}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">

        $("#form-floorinfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                edit();
            }
        }
        function edit(){
            var num = $("#num").val();
            var floorId = $("#floorId").val();
            var floorName = $("#floorName").val();
            var fireAirCondition=$("#fireAirCondition").val();
            var waterParam=$("#waterParam").val();
            var propertyManaParam=$("#propertyManaParam").val();
            var powerBatteryParam=$("#powerBatteryParam").val();
            var airConditionShareParam=$("#airConditionShareParam").val();
            var airConditionOilParam=$("#airConditionOilParam").val();
            var eleSchareFeeParam=$("#eleSchareFeeParam").val();
            var pubElecShareParam=$("#pubElecShareParam").val();
            var pubElecCoef=$("#pubElecCoef").val();
            var oilSum=$("#oilSum").val();
            var properElecCoef=$("#properElecCoef").val();
            var sunElecParam=$("#sunElecParam").val();
            var emptyParam=$("#emptyParam").val();
            var updatetime = $("#updatetime").val();
            var remark = $("#remark").val();

            $.ajax({
                cache : true,
                type : "POST",
                url : ctx + "sujian/floorManagement/edit",
                data : {
                    "num":num,
                    "floorId":floorId,
                    "floorName":floorName,
                    "fireAirCondition": fireAirCondition,
                    "waterParam": waterParam,
                    "propertyManaParam": propertyManaParam,
                    "powerBatteryParam": powerBatteryParam,
                    "airConditionShareParam": airConditionShareParam,
                    "airConditionOilParam": airConditionOilParam,
                    "eleSchareFeeParam": eleSchareFeeParam,
                    "pubElecShareParam": pubElecShareParam,
                    "pubElecCoef": pubElecCoef,
                    "oilSum": oilSum,
                    "properElecCoef": properElecCoef,
                    "sunElecParam": sunElecParam,
                    "emptyParam": emptyParam,
                    "updatetime": updatetime,
                    "remark": remark
                },
                async : false,
                error : function(request) {
                    $.modal.alertError("系统错误.");
                },
                success : function(data) {
                    $.operate.successCallback(data);
                }
            });
        }

    </script>
</body>
</html>